#include <stdlib.h>
#include <stdio.h>
#include "bitree.h" //请不要删除，否则检查不通过

void pre_order(BiTree root){
    Stack stk; init_stack(&stk);
    push(&stk, root);
    while(!is_empty(&stk)) {
        BiTNode *rt; pop(&stk, &rt);
        visit_node(rt);
        if(rt -> right) push(&stk, rt -> right);
        if(rt -> left) push(&stk, rt -> left);
    }
}